package com.jijuxie.system.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.jijuxie.system.domain.SysMenu;

import java.util.List;

public interface ISysMenuService extends IService<SysMenu> {

    /**
     * 根据用户ID查询菜单
     */
    List<SysMenu> selectMenusByUserId(Long userId);

    /**
     * 根据角色ID查询菜单
     */
    List<SysMenu> selectMenusByRoleId(Long roleId);

    /**
     * 构建前端所需要的菜单树
     */
    List<SysMenu> buildMenuTree(List<SysMenu> menus);

    /**
     * 根据父ID查询菜单
     */
    List<SysMenu> selectMenusByParentId(Long parentId);
}
